<!DOCTYPE html>
<html>

<head>
    <title></title>
    <style type="text/css">
        * {
            padding: 0;
            margin: 0;
        }
        
        #div1 {
            width: 100px;
            height: 100px;
            background-color: #ccc;
            margin: 100px auto;
            overflow: hidden;
        }
    </style>
    <script type="text/javascript">
        window.onload = function() {
            function likeJquery(id) {
                if (!id) {
                    return false;
                }
                this.oDiv = document.getElementById(id);
            }
            likeJquery.prototype.setWidth = function(name, value) {
                this.oDiv.style[name] = value;
                return this;
            }
            likeJquery.prototype.setheight = function(name, value) {
                this.oDiv.style[name] = value;
                return this;
            }

            function $(args) {
                return new likeJquery(args);
            }
            $('div1').setWidth('width', '200px').setheight('height', '200px')
        }
    </script>
</head>

<body>
    <div id="div1"></div>
</body>

</html>
